﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BLSingTowerMall;
using DTOSingTowerMall;

namespace FacadeSingTowerMall
{
    public class UserAccountFacade
    {
        UserAccountProcess Acct;
        private string message;
        private bool processSuccess = true;

        public bool ProcessSuccess { get { return processSuccess; } }

        public string Message{ get { return message; }}

        public bool AddUserRole(string userName, string Role)
        {
            return Acct.AddUserRole(userName, Role);
        }

        public UserAccountFacade()
        {
            Acct = new UserAccountProcess();
        }

        public void RegisterUserAccount(Guid userId, string fullName = "", string gender = "", string contactNo = "", string dateofBirth = "", string address = "")
        { 
            Acct.RegisterUserAccount(userId, fullName, gender, contactNo, dateofBirth, address);
            message = Acct.Message;
            processSuccess = Acct.ProcessSuccess;
        }

        public void UpdateUserAccount(Guid userId, string fullName = "", string gender = "", string contactNo = "", string dateofBirth = "", string address = "")
        {
            Acct.UpdateUserAccount(userId, fullName, gender, contactNo, dateofBirth, address);
            message = Acct.Message;
            processSuccess = Acct.ProcessSuccess;
        }

        public IUserDetail GetUserDetail(Guid userId)
        {
            return Acct.GetUserDetail(userId);
        }

    }
}
